<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    var fruit = prompt('请您输入查询的水果：');
    switch (fruit) {
      case '苹果':
        console.log('苹果的价格是3.5元/斤');
        break;
      case '桃子':
        console.log ('桃子的价格是3元/斤');
        break;
      case '芒果':
        console.log ('芒果的价格是5元/斤');
        break;
      case '榴莲':
        console.log ('榴莲的价格是23.8元/斤');
        break;
      default:
        console.log ('没有此水果')
    }
  </script>
</body>
</html>